function check() {
    return searchAll.value !== "";
}
function check2() {
    return search_passage.value !== "";
}

function page_initial() {
    let cpage = current_page.value;
    let lpage = last_page.value;
    if(cpage == 1) {
        document.getElementById("page_first_btn").disabled = true;
        document.getElementById("page_up_btn").disabled = true;
    }
    if(cpage === lpage) {
        document.getElementById("page_last_btn").disabled = true;
        document.getElementById("page_down_btn").disabled = true;
    }
}

function to_first_page() {
    document.getElementById("next_page").value = 1;
}

function to_last_page() {
    document.getElementById("next_page").value = last_page.value;
}

function page_up() {
    document.getElementById("next_page").value = parseInt(current_page.value) - 1;
}

function page_down() {
    document.getElementById("next_page").value = parseInt(current_page.value) + 1;
}

//后台
function submitForm() {
    document.getElementById("next_page").value = document.getElementById("pages").value;
    document.getElementById("page_box").submit();
}